package com.powerhousecreative.q;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import android.widget.GridView;

@SuppressLint("ValidFragment")
public class DummySectionFragment extends Fragment {
	private GridViewAdapter adapter;
	
	/**
	 * The fragment argument representing the section number for this
	 * fragment.
	 */
	public static final String ARG_SECTION_NUMBER = "section_number";

	public DummySectionFragment() {
		adapter = null;
	}
	
	public DummySectionFragment(GridViewAdapter adapter) {		
		this.adapter = adapter;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.fragment_main_dummy,
				container, false);
		
		if (adapter != null) {
			GridView gridView = (GridView) rootView.findViewById(R.id.gridView);
			gridView.setAdapter(adapter);		
//			gridView.setClickable(true);
//			
//			gridView.setOnItemClickListener(new OnItemClickListener() {
//	            @Override
//	            public void onItemClick(AdapterView<?> parent, View v,
//	                    int position, long id) {
//	 
//	            	Log.d("Click", "id#" + position);
//	            }
//	        });
		}
		
//		TextView TitleTextView = (TextView) rootView
//				.findViewById(R.id.section_label);
//		TitleTextView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));		
		return rootView;
	}
}